package com.example.kami.test;


import com.alibaba.fastjson.JSON;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.LinkedHashMap;


/**
 * @author liuhang
 * @description 莱斯抢红包 (v1:不需要卡密，v2:需要卡密)
 * @date 2022/02/09
 */
@RestController
@RequestMapping("/ls")
public class lsController {
    Logger log = LoggerFactory.getLogger(lsController.class);

    @RequestMapping(value = "/v1/login")
    public String login() {
        LinkedHashMap map = new LinkedHashMap();
        LinkedHashMap map1 = new LinkedHashMap();
        map1.put("expirytime", 1944298598);

        map.put("code", 1);
        map.put("time", System.currentTimeMillis() / 1000);
        map.put("msg", "登录成功");
        map.put("data", map1);

        log.info("莱斯红包登录成功！");
        return JSON.toJSONString(map);
    }
}
